/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Fuente;
import java_cup.runtime.Symbol;
import java.io.*;
/**
 *
 * @author Ivan
 */
class Main {
    static boolean do_debug_parse = false;
    static TablaSimbolos tabla = new TablaSimbolos();
    static public void main(String[] args) throws java.io.IOException {
		parser parser_obj = new parser(new Scanner(new FileReader(System.getProperty("user.dir")+"/src/fuente/entrada.txt"),tabla));
		Symbol parse_tree = null;
		try {
			if (do_debug_parse)
                            parse_tree = parser_obj.debug_parse();
			else        
                            parse_tree = parser_obj.parse();
                            System.out.println("Entrada correcta");
                            tabla.imprimir();
		} catch (Exception e) {
                            System.out.println("Entrada incorrecta");
		}

    }
}